

#include <iostream>
#include <memory>
#include <string>
#include <unistd.h>
#include <vector>
#include "Thread.h"

using namespace zepco;


void func() {
    std::cout << "id: " << Thread::GetThreadID() << ", name: " << Thread::GetThreadName();
    std::cout << ", this id: " << Thread::GetThis()->getID() << ", this name: " << Thread::GetThis()->getName() << std::endl;

    sleep(600);
}

int main() {

    std::cout << "Hello World\n";

    std::vector<std::shared_ptr<Thread>> thrs;

    for (int i = 0; i < 5; i++) {
        std::shared_ptr<Thread> thr = std::make_shared<Thread>(&func, "Thread_" + std::to_string(i));
        thrs.push_back(thr);
    }

    for (int i = 0; i < 5; i++) {
        thrs[i]->join();
    }
    return 0;
}